<template>
  <div>
    <h1 style="text-align: center">欢迎光临</h1>
    <template>
      <el-carousel :interval="4000" type="card" height="38vw">
        <el-carousel-item v-for="item in imgbox" :key="item">
          <img :src="item.idView" style="width: 100%; height: auto" />
        </el-carousel-item>
      </el-carousel>
    </template>
  </div>
</template>


<script>
export default {
  name: "Home",
  components: {},
  data() {
    return {
      imgbox: [
        { id: 1, idView: require("../img/cola.jpg") },
        { id: 2, idView: require("../img/bread.jpg") },
        { id: 3, idView: require("../img/fanta.jpg") },
        { id: 4, idView: require("../img/noodles.jpg") },
      ],
    };
  },
};
</script>
<style>
.el-carousel__item h3 {
  /* color: #475669; */
  font-size: 14px;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
}

/* .el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
} */
</style>